<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .k1 {
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .k1 img:first-child {
            width: 200px;
        }

        .k1 img:last-child {
            width: 20px;
            position: relative;
            right: 110px;
            display: none;
        }

        .k1 img:last-child:hover {
            cursor: pointer;
            opacity: 0.5;
            display:inline-block;
            color:#FFF ;
        }
    </style>

</head>
<body>

<div class="k1">
    <img src="./imgs/大海001.jpg" alt="大海"/>
    <img src="./imgs/del.png" alt="del" class="del"/>
</div>
<script>
    const delImage = document.querySelector('.k1 img:last-child');
    delImage.addEventListener('mouseenter', function () {
        this.style.opacity = 1;
    });
</script>
</body>
</html>
